﻿function ranklist1(id,ele,elename,elechild,start_ele,cur_ele){  

    var obj_id=document.getElementById(id);  

    var obj_ele=$tag(obj_id,ele);  

    for(i=0;i<obj_ele.length;i++){  

        if(obj_ele[i].className.indexOf(elename) == -1) continue;  

        var objlist=$tag(obj_ele[i],elechild);  

        for(j=0;j<objlist.length;j++){  

            objlist[j].onmouseover=function(){  

                var paris=this.parentNode;  

                var list=$tag(paris,elechild);  

                for(x=0;x<list.length;x++){  

                    var thisdiv=$tag(list[x],cur_ele)[0];  

                    var thisp=$tag(list[x],start_ele)[0];  

                    thisdiv.style.display="none";  

                    thisp.style.display="block"; 

                    }  

                var start=$tag(this,start_ele)[0];  

                start.style.display='none';  

                var cur=$tag(this,cur_ele)[0];  

                cur.style.display='block';  

            }  

        }  

    }  

}  

function $tag(id,tag){return id.getElementsByTagName(tag);}  

setTimeout("ranklist1('ranklist1','ul','topcn','li','p','div')",0);  
